﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

[Serializable]
public class WebSessions
{
    public WebSessions()
    { }
    protected int _userid;
    protected string _username = string.Empty;
    protected string _password = string.Empty;
    protected string _usertheme = string.Empty;
    protected string _userlang = string.Empty;
    protected DateTime _userlastlogintime;
    protected string _userlastloginip = string.Empty;

    /// <summary>
    /// Session记录
    /// </summary>
    /// <param name="userid">登录ID</param>
    /// <param name="username">登录名</param>
    /// <param name="usertheme">登录用户皮肤</param>
    /// <param name="userlastlogintime">登录时间</param>
    /// <param name="userlastloginip">登录IP</param>
    public WebSessions(string userid, string username)
    {
        _userid = Convert.ToInt32((userid));
        _username = username;
    }
    /// <summary>
    /// 用户配置方案
    /// </summary>
    public string UserTheme
    {
        set { _usertheme = value; }
        get { return _usertheme; }
    }

    /// <summary>
    /// 登录用户ID
    /// </summary>
    public int UserID
    {
        set { _userid = value; }
        get { return _userid; }
    }
    /// <summary>
    /// 登录用户姓名
    /// </summary>
    public string UserName
    {
        set { _username = value; }
        get { return _username; }
    }

    /// <summary>
    /// 上次用户登录时间
    /// </summary>
    public DateTime UserLastLoginTime
    {
        set { _userlastlogintime = value; }
        get { return _userlastlogintime; }
    }
    /// <summary>
    /// 上次用户登录IP地址
    /// </summary>
    public string UserLastLoginIp
    {
        set { _userlastloginip = value; }
        get { return _userlastloginip; }
    }
}